package com.hcbd.tdwt.base.bd;

import android.util.Log;

public class BdToolFactory {
    public static  final int FU_DA_BG_TYPE=1;//福大APP样式
    public static  final int HAI_GE_BG_TYPE=2;//海格APP样式
    public static  final int HLCT_BG_TYPE=3;//华力创通样式
    public static  final int XY_BG_TYPE=0;//星宇样式
    public static  final int XY_PDA_BG_TYPE=4;//星宇手持机版本
    private static BdSendBase bdSendBase=null;
    public static  BdSendBase newInstance(int type) {
        app_type=type;
        switch (type) {
            case XY_BG_TYPE:
                bdSendBase=new XyBdSendChild();
                MOBILE_PHONE_TYPE=ORDINARY_MOBILE_PHONE;
                Log.e("newInstance:","星宇手机版本");
                break;
            case XY_PDA_BG_TYPE:
                bdSendBase=new XyPdaBdSendChild();
                MOBILE_PHONE_TYPE=SATELLITE_MOBILE_PHONE;
                Log.e("newInstance:","星宇手持机版本");
                break;
            case FU_DA_BG_TYPE:
                Log.e("newInstance:","福大手持机版本");
                break;
            case HAI_GE_BG_TYPE:
                bdSendBase=new FdPdaBdSendChild();
                MOBILE_PHONE_TYPE=SATELLITE_MOBILE_PHONE;
                Log.e("newInstance:","海格手持机版本");
                break;
            case HLCT_BG_TYPE:
                bdSendBase=new HlctBdSendChild();
                MOBILE_PHONE_TYPE=ORDINARY_MOBILE_PHONE;
                Log.e("newInstance:","华力创通手机版本");
                break;

            default:
                bdSendBase=new XyPdaBdSendChild();
                MOBILE_PHONE_TYPE=SATELLITE_MOBILE_PHONE;
//                bdSendBase=new DefaultBdSend();
//                MOBILE_PHONE_TYPE=ORDINARY_MOBILE_PHONE;
                Log.e("newInstance:","默认版本");
                break;
        }
        return bdSendBase;
    }
    public static BdSendBase getBdSendBase(){
        if(bdSendBase==null){
            bdSendBase=new XyPdaBdSendChild();
        }
        return bdSendBase;
    }
/*  // TODO: 2023/1/13
    public static  final int FU_DA_BG_TYPE=1;//福大APP样式
    public static  final int HAI_GE_BG_TYPE=2;//海格APP样式
    public static  final int HLCT_BG_TYPE=3;//华力创通样式
    public static  final int XY_PDA_BG_TYPE=4;//星宇手持机版本
    public static  final int XY_BG_TYPE=0;//星宇样式*/
    public  static int app_type=0;//APP类型
    public  static final int ORDINARY_MOBILE_PHONE=0;//普通手机
    public  static final int SATELLITE_MOBILE_PHONE=1;//手持机
    public  static int MOBILE_PHONE_TYPE=ORDINARY_MOBILE_PHONE;//手机类型
}
